Minor changes
[RRRRHHHH_Code] / ruralHouses client / src / domain / Account.java
1 package domain;
2
3 import java.io.Serializable;
4 import java.util.Arrays;
5
6
7
8 public class Account implements Serializable {
9
10         /**
11          * 
12          */
13         private static final long serialVersionUID = 1L;
14         
15
16         private byte[] username;
17         private byte[] password;
18         private byte[] salt;
19
20
21         private Owner owner;
22         private boolean admin = false;
23
24         
25         
26
27         public byte[] getUsername() {
28                 return username;
29         }
30
31         public byte[] getPassword() {
32                 return password;
33         }
34
35         public Owner getOwner() {
36                 return owner;
37         }
38
39         public boolean getAdmin() {
40                 return admin;
41         }
42
43         public void setAdmin(boolean admin) {
44                 this.admin = admin;
45         }
46
47         public byte[] getSalt() {
48                 return salt;
49         }
50
51         public void setSalt(byte[] salt) {
52                 this.salt = salt;
53         }
54         
55
56         @Override
57         public boolean equals(Object obj) {
58                 if (this == obj)
59                         return true;
60                 if (obj == null)
61                         return false;
62                 if (getClass() != obj.getClass())
63                         return false;
64                 Account other = (Account) obj;
65                 if (!Arrays.equals(password, other.password))
66                         return false;
67                 if (!Arrays.equals(username, other.username))
68                         return false;
69                 return true;
70         }
71
72 }